function strMapToObj(strMap) {
    let obj = Object.create(null);
    for (const [key, val] of strMap) {
        obj[key] = val;
    }
    return obj;
}

var myMap = new Map().set("yes", true).set("no", false);

console.log(strMapToObj(myMap));


